﻿using ServerSide.Model.Other;
using ServerSide.Model;
using ServerSide.Model.Dto.UserDto;
using ServerSide.Model.Dto.MenuDto;

namespace ServerSide.Service.Interface
{
    /// <summary>
    /// 菜单管理页面接口
    /// </summary>
    public interface IMenuService
    {
        /// <summary>
        /// 查询，菜单管理获取所有菜单数据，
        /// </summary>
        /// <param name="menuRequest"></param>
        /// <returns></returns>
        List<Menu> GetMenus(MenuRequest menuRequest);
        /// <summary>
        /// 角色页面分配菜单权限是获取所有菜单数据
        /// </summary>
        /// <returns></returns>
        List<Menu> SelectMenuList();
        /// <summary>
        /// 登录时根据用户id权限获取相应菜单
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<Menu> GetMenuById(int userId);
        bool AddMenu(MenuAdd menuAdd);

        bool DelMenu(Menu menu);
        bool BatchDelMenus(List<int> ids);

        bool UpdateMenu(Menu menu);
        /// <summary>
        /// 是否让页面保持缓存
        /// </summary>
        /// <param name="id"></param>
        /// <param name="keepAlive"></param>
        /// <returns></returns>
        bool UpdateMenuKeepAlive(int id, int keepAlive);
    }
}
